package com.example.demo.幂等性控制.controller;

import com.example.demo.幂等性控制.anniontion.XianLiu;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @projectName:demo
 * @see:com.example.demo.幂等性控制.controller
 * @author:袁成龙
 * @createTime:2020/10/14 13:04
 * @version:1.0
 */
@RestController
public class TestXianLiuController {

    private static int count=0;

    @RequestMapping("testString")
    @XianLiu
    public void testString(){

        synchronized ("pppp"){
            count++;
        }

        System.out.println("======================="+count);
    }

}